home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / pj9_3.arc / VMHEADER.H < prev   
C/C++ Source or Header  |  1991-10-07  |  1KB  |  32 lines

  1. /*    
  2.  *    vmheader.h 
  3.  *    by Stephen Kuhn (The Iliad Group)
  4.  *
  5.  *    Example structures for several pieces of information that the 
  6.  *    VM manager needs to maintain for each VM block.  
  7.  *    It is most convenient to organize them into data structures that refer 
  8.  *    to a single VM block.  
  9.  */
  10.  
  11. struct vmheader {
  12.     int    location;    /* Current block location: 0=disk,1=RAM */
  13.     char *addr;        /* RAM location, if in RAM */
  14.     int    prev;        /* MRU chain previous */
  15.     int    next;        /* MRU chain next */
  16.     int    number;        /* VM Block # contained in this struct */
  17.     int    free;        /* Free chain next ptr */
  18.     int    qfree;        /* Queued free chain head */
  19.     int    allocs;        /* # allocations this block */
  20.     int    dirty;        /* Has block been modified? */
  21.     int    maxfree;    /* Maximum free block size */
  22.     int    memtype;    /* Block type: DOS or EMS */
  23.     int    windnum;    /* If an EMS block, the hardware window */
  24.     int    pagenum;    /* If an EMS block, the software page */
  25. };
  26.  
  27. struct freeblk    {
  28.     int    next;        /* Offset of the next free chunk of mem */
  29.     int    size;        /* The size of this free chunk */
  30. };
  31.  
  32.